From f8c2aaf4737af09bc27cf92f8cfa46ab3645455a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 6 Jan 2008 06:35:49 +0000 Subject: [PATCH] Document the ::output signal and add an example. (#507566, example by Owen 2008-01-06 Matthias Clasen * gtk/gtkspinbutton.c: Document the ::output signal and add an example. (#507566, example by Owen Taylor) svn path=/trunk/; revision=19312 --- ChangeLog | 17 +++++++++++++++++ gtk/gtkspinbutton.c | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/ChangeLog b/ChangeLog index 45f49670d3..49fc0a9933 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-06 Matthias Clasen + + * gtk/gtkspinbutton.c: Document the ::output signal and + add an example. (#507566, example by Owen Taylor) + 2008-01-06 Johan Dahlin * gtk/gtkcellrenderercombo.c: @@ -97,6 +102,18 @@ * gtk/gtkiconfactory.c (render_fallback_image): Adjust to icon cache api change. (#506135, Kazuki Iwamoto) +2007-12-28 Mathias Hasselmann + + Consider "wide-separators" and "separator-height" style properties: + The separator is drawn using gtk_paint_box instead of cairo, when + "wide-separators" is set. Also do not highlight details for previous + or next month, if their day matches the selected day. (#339540) + + * gtk/gtkcalendar.c: Consider "wide-separators" and "separator-height" + in gtk_calendar_size_request and calendar_paint_day + * gtk/gtkstyle.c: Modify gtk_default_draw_box to use special colors + for selected detail separators in GtkCalendar. + 2007-12-28 Mathias Hasselmann Remove max_detail_height field from GtkCalendarPrivate. (#339540) diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 7aa6ebaa52..4831ba5d7a 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -290,6 +290,33 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class) G_TYPE_INT, 1, G_TYPE_POINTER); + /** + * GtkSpinButton::output: + * @spin_button: the object which received the signal + * + * The ::output signal can be used to change to formatting + * of the value that is displayed in the spin buttons entry. + * |[ + * /* show leading zeros */ + * static gboolean + * on_output (GtkSpinButton *spin, + * gpointer data) + * { + * GtkAdjustment *adj; + * gchar *text; + * + * adj = gtk_spin_button_get_adjustment (spin); + * value = (int)gtk_adjustment_get_value (adj); + * text = g_strdup_printf ("%02d", value); + * gtk_entry_set_text (GTK_ENTRY (spin), text); + * g_free (text); + * + * return TRUE; + * } + * ]| + * + * Returns: %TRUE if the value has been displayed. + */ spinbutton_signals[OUTPUT] = g_signal_new (I_("output"), G_TYPE_FROM_CLASS (gobject_class), -- 2.30.2